/*
 * Copyright (C) 2011  John Lawrence thegordo.john at gmail.com
 * Licensed under GPLv3 or later. see http://www.gnu.org/copyleft/gpl.html
 */

package org.jklawrencefam.Util;

import java.util.HashMap;

/**
 * User: John Lawrence
 * Date: 6/2/11
 * Time: 12:51 AM
 */
public class Parameters {
    private HashMap<ParameterKey, Object> params;

    public Parameters() {
        params = new HashMap<ParameterKey, Object>();
    }

    public void setParameter(ParameterKey key, Object value) {
        params.put(key, value);
    }

    public <T> T getParameter(ParameterKey key, Class<T> classs) {
        //noinspection unchecked
        return (T) params.get(key);
    }

    public void clearParameters() {
        params.clear();
    }
}
